<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>

<body>
<%
Dim iTaxonID(10)
Dim iChineseName(10)
Dim iUpperTaxonID(10)

sub printer(p)
	Dim i
	for i=1 to num
		if iUpperTaxonID(i)=p then
			response.Write("<li>" & iChineseName(i) & "<ul>")
			printer CInt(iTaxonID(i))
			response.Write("</ul></li>")
		end if
	next
end sub

set conn=server.createobject("adodb.connection")
conn.open "provider=microsoft.jet.oledb.4.0;data source="&server.mappath("App_Data\TestDB.mdb")
set rs=server.createobject("adodb.recordset")
rs.open "SELECT * FROM [Taxon]",conn,3,3
while not rs.eof
	i=Cint(rs("TaxonID"))
	iTaxonID(i)=i
	iChineseName(i)=rs("ChineseName")
	iUpperTaxonID(i)=rs("UpperTaxonID")
	rs.movenext
wend
rs.close
set rs=nothing
conn.close
set conn=nothing

num=i
response.Write("<ul>")
printer(0)
response.Write("</ul>")
%>
</body>
</html>
